//
//  BaseEngine.h
//  HuLaQuan
//
//  Created by hok on 1/7/16.
//  Copyright © 2016 Jianghao. All rights reserved.
//

#import <Foundation/Foundation.h>


#import <CommonCrypto/CommonCryptor.h>
#import <CommonCrypto/CommonDigest.h>
#import "GTMBase64.h"

#import "NetWorkConfig.h"

#import "NSData+Base64.h"

#import "YuHTTPClient.h"

#import "NSString+MD5.h"

#import "RSA.h"

#import "NSString+ThreeDES.h"

#import "3DES.h"

#import "XMLDictionary.h"

#import "YuUserDefaultsUtilities.h"

@interface BaseEngine : NSObject

/**
 *  获取请求URL
 *
 *  @param path
 *  @return 拼装好的URL
 */
- (NSString *)formRequestUrlWithPath:(NSString *)path;

//- (NSString*)TripleDES:(NSString*)plainText encryptOrDecrypt:(CCOperation)encryptOrDecrypt key:(NSString*)key;
- (NSString *)createKeyWithLength:(int)length;

- (NSString *)base64EncodeString:(NSString *)string;
- (NSString *)base64DecodeString:(NSString *)string;

- (NSData *)base64Data:(NSString *)string;

- (NSString *)firstString;
- (NSString *)secondStringWithKey:(NSString *)key;
- (NSString *)thirdStringWithBody:(NSString *)src andKey:(NSString *)key;

/**
 *  获取当前时间戳
 *
 *  @return 获取当前时间戳
 */
- (NSString *)getSerialNumber;
/**
 *  解析从银联后台连接成功后获取的数据
 *
 *  @param resultString xml数据
 *
 *  @return 解析后的NSDictionary
 */
- (NSDictionary *)parseXMLFromYinLianConnection:(NSString *)resultString;

//- (NSString*)encrypt:(NSString*)plainText withKey:(NSString *)key;
//- (NSString*)decrypt:(NSString*)encryptText withKey:(NSString *)key;
@end
